If an error condition occurs, this routine returns an integer
indicating the type of error. Possible return values are as
follows:
Return Description
0 Successful completion.
[EINVAL] The value specified by cond, mutex, or abstime is
invalid, or
Different mutexes are supplied for concurrent
pthread_cond_timedwait() operations or
pthread_cond_wait() operations on the same condition
variable, or
The mutex was not owned by the calling thread at the
time of the call.
[ETIMEDOUT] The time specified by abstime expired.
[ENOMEM] The Threads Library cannot acquire memory needed
to block using a statically initialized condition
variable.